package com.me.entity;

import java.sql.Date;
import java.sql.Timestamp;

import org.apache.ibatis.type.Alias;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.me.customize.JsonTimeStampSerializer;

/**
 * 会员表
 * @author dong
 *
 */
@Alias("member")
public class Member extends BaseEntity {
	private static final long serialVersionUID = 1L;
	
	// 主键
	private int id;
	
	// 账号
	private String account;
	
	// 密码
	private String password;
	
	// 昵称
	private String nickName;
	
	// 年龄
	private Integer age;
	
	// 生日
	private Date birthday;
	
	// 注册时间
	private Timestamp registerTime;
	
	// 更新时间
	private Timestamp modifyTime;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	@JsonSerialize(using=JsonTimeStampSerializer.class)
	public Timestamp getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Timestamp registerTime) {
		this.registerTime = registerTime;
	}
	
	@JsonSerialize(using=JsonTimeStampSerializer.class)
	public Timestamp getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Timestamp modifyTime) {
		this.modifyTime = modifyTime;
	}

	@Override
	public String toString() {
		return "Member [id=" + id + ", account=" + account + ", password="
				+ password + ", nickName=" + nickName + ", age=" + age
				+ ", birthday=" + birthday + ", registerTime=" + registerTime
				+ ", modifyTime=" + modifyTime + "]";
	}
}
